/**
 * "Visual Paradigm: DO NOT MODIFY THIS FILE!"
 * 
 * This is an automatic generated file. It will be regenerated every time 
 * you generate persistence class.
 * 
 * Modifying its content may cause the program not work, or your work may lost.
 */

/**
 * Licensee: DuKe TeAm
 * License Type: Purchased
 */
package com.nicolascarrascob.pds.serviciosoap.orm;

import java.util.List;
import org.hibernate.criterion.DetachedCriteria;
import org.orm.PersistentSession;
import org.orm.criteria.*;

public class SalaDetachedCriteria extends AbstractORMDetachedCriteria {
	public final IntegerExpression idSala;
	public final StringExpression nombreSala;
	public final IntegerExpression numButacas;
	
	public SalaDetachedCriteria() {
		super(com.nicolascarrascob.pds.serviciosoap.orm.Sala.class, com.nicolascarrascob.pds.serviciosoap.orm.SalaCriteria.class);
		idSala = new IntegerExpression("idSala", this.getDetachedCriteria());
		nombreSala = new StringExpression("nombreSala", this.getDetachedCriteria());
		numButacas = new IntegerExpression("numButacas", this.getDetachedCriteria());
	}
	
	public SalaDetachedCriteria(DetachedCriteria aDetachedCriteria) {
		super(aDetachedCriteria, com.nicolascarrascob.pds.serviciosoap.orm.SalaCriteria.class);
		idSala = new IntegerExpression("idSala", this.getDetachedCriteria());
		nombreSala = new StringExpression("nombreSala", this.getDetachedCriteria());
		numButacas = new IntegerExpression("numButacas", this.getDetachedCriteria());
	}
	
	public PeliculaDetachedCriteria createPeliculaCriteria() {
		return new PeliculaDetachedCriteria(createCriteria("pelicula"));
	}
	
	public Sala uniqueSala(PersistentSession session) {
		return (Sala) super.createExecutableCriteria(session).uniqueResult();
	}
	
	public Sala[] listSala(PersistentSession session) {
		List list = super.createExecutableCriteria(session).list();
		return (Sala[]) list.toArray(new Sala[list.size()]);
	}
}

